package registration.webapi;

import registration.SalesManager;

public class SalesManagerDTO {
    private SalesManagerDTO() {
    }

    /**
     * 拼装 SalesManDto 类型的 DTO 对象
     *
     * @param salesman 输入
     * @return DTO对象
     */
    public static SalesManagerDTO of(SalesManager salesman) {
        SalesManagerDTO dto = new SalesManagerDTO();
        dto.id = salesman.getId();
        dto.name = salesman.getName().getText();
        return dto;
    }

    // 销售代表ID
    private Long id;

    // 销售代表姓名
    private String name;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
